/**
 * @file protocol.h
 * @author 赵曦 (535394140@qq.com)
 * @brief 协议数据包管理头文件
 * @version 1.0
 * @date 2021-09-18
 *
 * @copyright Copyright SCUT RobotLab(c) 2021
 *
 */

#pragma once

#include "transfer_data.h"

//! @addtogroup protocol
//! @{

//! Abstract protocol library
class protocol
{
public:
    protocol() = default;

    /**
     * @brief 读取数据
     */
    virtual TransferData read() = 0;

    /**
     * @brief 写入数据
     */
    virtual void write(const TransferData &) = 0;

    // 是否打开
    virtual bool isOpened() = 0;
};

//! @} protocol
